package view.interfaces;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.border.EmptyBorder;

public class telaAtendente extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					telaAtendente frame = new telaAtendente();
					frame.setResizable(false);
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public telaAtendente() {
		setTitle("Atendente");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 537, 366);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);

		JPanel panel = new JPanel();

		JPanel panel_1 = new JPanel();

		JButton btnNewButton_1 = new JButton("PEDIDO");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				new telaPedido().setVisible(true);
				setVisible(false);
			}
		});
		btnNewButton_1.setFont(new Font("Tahoma", Font.BOLD, 14));

		JPanel panel_2 = new JPanel();
		GroupLayout gl_contentPane = new GroupLayout(contentPane);
		gl_contentPane
				.setHorizontalGroup(gl_contentPane
						.createParallelGroup(Alignment.LEADING)
						.addGroup(
								gl_contentPane
										.createSequentialGroup()
										.addGroup(
												gl_contentPane
														.createParallelGroup(
																Alignment.LEADING)
														.addComponent(
																panel_2,
																GroupLayout.DEFAULT_SIZE,
																508,
																Short.MAX_VALUE)
														.addGroup(
																gl_contentPane
																		.createSequentialGroup()
																		.addComponent(
																				panel,
																				GroupLayout.DEFAULT_SIZE,
																				251,
																				Short.MAX_VALUE)
																		.addPreferredGap(
																				ComponentPlacement.RELATED)
																		.addComponent(
																				panel_1,
																				GroupLayout.DEFAULT_SIZE,
																				251,
																				Short.MAX_VALUE)))
										.addGap(3)));
		gl_contentPane.setVerticalGroup(gl_contentPane.createParallelGroup(
				Alignment.TRAILING).addGroup(
				gl_contentPane
						.createSequentialGroup()
						.addComponent(panel_2, GroupLayout.DEFAULT_SIZE, 109,
								Short.MAX_VALUE)
						.addPreferredGap(ComponentPlacement.UNRELATED)
						.addGroup(
								gl_contentPane
										.createParallelGroup(Alignment.LEADING)
										.addComponent(panel_1,
												GroupLayout.DEFAULT_SIZE, 189,
												Short.MAX_VALUE)
										.addComponent(panel,
												GroupLayout.DEFAULT_SIZE, 189,
												Short.MAX_VALUE)).addGap(10)));

		JLabel lblOlAtendente = new JLabel("Ol\u00E1 Atendente!");
		lblOlAtendente.setForeground(Color.RED);
		lblOlAtendente.setFont(new Font("Traditional Arabic", Font.BOLD, 20));
		lblOlAtendente
				.setIcon(new ImageIcon(
						"C:\\Users\\Michael\\Documents\\Faculdade\\Plano de Ensino - Disciplina Projeto Interativo IV\\Projeto Pizzaria\\Pizzaria\\src\\tumblr_lln52xMpNv1qab04f.gifC:\\Users\\Michael\\Documents\\Faculdade\\Plano de Ensino - Disciplina Projeto Interativo IV\\Projeto Pizzaria\\Pizzaria\\src\\tumblr_lln52xMpNv1qab04f.gif"));

		JButton btnNewButton_2 = new JButton("VOLTAR");
		btnNewButton_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				new telaPrincipal().setVisible(true);
				setVisible(false);
			}
		});

		btnNewButton_2.setFont(new Font("Tahoma", Font.BOLD, 12));

		JLabel lblNewLabel = new JLabel(
				"Escolha o movimento que deseja fazer com os bot\u00F5es abaixo:");
		lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 12));
		GroupLayout gl_panel_2 = new GroupLayout(panel_2);
		gl_panel_2.setHorizontalGroup(gl_panel_2
				.createParallelGroup(Alignment.LEADING)
				.addGroup(
						gl_panel_2
								.createSequentialGroup()
								.addContainerGap()
								.addComponent(lblOlAtendente,
										GroupLayout.DEFAULT_SIZE, 258,
										Short.MAX_VALUE).addGap(171)
								.addComponent(btnNewButton_2))
				.addComponent(lblNewLabel, Alignment.TRAILING,
						GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE));
		gl_panel_2.setVerticalGroup(gl_panel_2.createParallelGroup(
				Alignment.LEADING)
				.addGroup(
						gl_panel_2
								.createSequentialGroup()
								.addGroup(
										gl_panel_2
												.createParallelGroup(
														Alignment.BASELINE)
												.addComponent(lblOlAtendente)
												.addComponent(btnNewButton_2))
								.addPreferredGap(ComponentPlacement.UNRELATED)
								.addComponent(lblNewLabel)
								.addContainerGap(GroupLayout.DEFAULT_SIZE,
										Short.MAX_VALUE)));
		panel_2.setLayout(gl_panel_2);
		panel_1.setLayout(new CardLayout(0, 0));
		panel_1.add(btnNewButton_1, "name_6548614561170");
		panel.setLayout(new CardLayout(0, 0));

		JButton btnNewButton = new JButton("CLIENTE");
		btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 14));
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				telaCliente telaCliente = new telaCliente();
				telaCliente.setVisible(true);
				telaCliente.lista();
				setVisible(false);
			}
		});

		panel.add(btnNewButton, "name_6542860326627");
		contentPane.setLayout(gl_contentPane);
	}
}
